# Target Variants#CreateTargetVariant

Create a new Scan Target Variant

Endpoint: POST /sto/api/v2/targets/{targetId}/variants
Version: 1.0
Security: 

## Query parameters:

  - `accountId` (string, required)
    Harness Account ID
    Example: "abcdef1234567890ghijkl"

## Path parameters:

  - `targetId` (string, required)
    Associated Target ID
    Example: "abcdef1234567890ghijkl"

## Header parameters:

  - `X-Api-Key` (string)
    Harness personal or service access token
    Example: "Sed aut tempora."

## Request fields (application/json):

  - `hash` (string)
    Git Commit or Container Image hash
    Example: "d1998db4b4651a4b9be9ecf320a2dfb8b4710e35"

  - `parameters` (object, required)
    Parameters for this Variant, as a JSON-encoded string
    Example: {"branch":"main"}

## Response 200 fields (application/json):

  - `id` (string, required)
    Resource identifier
    Example: "abcdef1234567890ghijkl"

## Response 400 fields (application/json):

  - `message` (string, required)
    Example: "Not Found"

  - `status` (integer)
    Example: 404


